package com.sls.nzdapplication.model;


import com.alibaba.fastjson.JSONObject;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;

import java.util.Date;
import org.greenrobot.greendao.annotation.Generated;

@Entity
public class Equipment {

    @Id
    private String id;

    private String name;

    private String type;

    private int code;

    //经度
    private Double lon;

    //纬度
    private Double lat;

    private Date createTime;

    private String createBy;

    private Date modifyTime;

    private String modifyBy;

    private String previousEquipmentId;

    private String workLineId;

    //导线类型
    private String dxlx;

    //电缆型号
    private String dlxh;

    //连接方式
    private String lxfs;

    //同杆架设
    private String tgjs;

    //设备状态
    private String sbzt;

    //杆塔性质
    private String gtxz;

    //杆塔型号
    private String gtxh;

    //基础形式
    private String jcxs;

    //是否农网
    private String sfnw;

    //缺陷信息
    private String qxxx;

    //开关类型
    private String kglx;

    //所属杆塔
    private String ssgt;

    //设备型号
    private String sbxh;

    //开关状态
    private String kgzt;

    //设备容量
    private String sbrl;

    //杆塔材质
    private String gtcz;

    //变电箱id
    private String pdxId;

    public JSONObject toJson(){
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("id",this.id);
        jsonObject.put("name",this.name);
        jsonObject.put("createTime",this.createTime);
        jsonObject.put("createBy",this.createBy);
        jsonObject.put("modifyTime",this.modifyTime);
        jsonObject.put("code",this.code);
        jsonObject.put("type",this.type);
        jsonObject.put("previousEquipmentId",this.previousEquipmentId);
        jsonObject.put("lon",this.lon);
        jsonObject.put("lat",this.lat);
        jsonObject.put("dxlx",this.dxlx);
        jsonObject.put("dlxh",this.dlxh);
        jsonObject.put("lxfs",this.lxfs);
        jsonObject.put("tgjs",this.tgjs);
        jsonObject.put("sbzt",this.sbzt);
        jsonObject.put("gtxz",this.gtxz);
        jsonObject.put("gtxh",gtxh);
        jsonObject.put("jcxs",this.jcxs);
        jsonObject.put("sfnw",this.sfnw);
        jsonObject.put("qxxx",this.qxxx);
        jsonObject.put("kglx",this.kglx);
        jsonObject.put("ssgt",this.ssgt);
        jsonObject.put("sbxh",this.sbxh);
        jsonObject.put("pdxId",this.pdxId);
        jsonObject.put("sbrl",this.sbrl);
        jsonObject.put("kgzt",this.kgzt);
        jsonObject.put("gtcz",gtcz);
        jsonObject.put("workLineId",this.workLineId);
        return jsonObject;
    }
    public Equipment(JSONObject jsonObject){
        this.id = jsonObject.getString("id");
        this.name = jsonObject.getString("name");
        this.code = jsonObject.getIntValue("code");
        this.createTime = jsonObject.getDate("createTime");
        this.createBy = jsonObject.getString("createBy");
        this.modifyTime = jsonObject.getDate("modifyTime");
        this.modifyBy = jsonObject.getString("modifyBy");
        this.type = jsonObject.getString("type");
        this.previousEquipmentId = jsonObject.getString("previousEquipmentId")==null?"":jsonObject.getString("previousEquipmentId");
        this.lon = jsonObject.getDouble("lon");
        this.lat = jsonObject.getDouble("lat");
        this.dxlx = jsonObject.getString("dxlx")==null?"":jsonObject.getString("dxlx");
        this.dlxh = jsonObject.getString("dlxh")==null?"":jsonObject.getString("dlxh");
        this.lxfs = jsonObject.getString("lxfs")==null?"":jsonObject.getString("lxfs");
        this.tgjs = jsonObject.getString("tgjs")==null?"":jsonObject.getString("tgjs");
        this.sbzt = jsonObject.getString("sbzt")==null?"":jsonObject.getString("sbzt");
        this.gtxz = jsonObject.getString("gtxz")==null?"":jsonObject.getString("gtxz");
        this.gtxh = jsonObject.getString("gtxh")==null?"":jsonObject.getString("gtxh");
        this.kgzt = jsonObject.getString("kgzt")==null?"":jsonObject.getString("kgzt");
        this.jcxs = jsonObject.getString("jcxs")==null?"":jsonObject.getString("jcxs");
        this.sfnw = jsonObject.getString("sfnw")==null?"":jsonObject.getString("sfnw");
        this.qxxx = jsonObject.getString("qxxx")==null?"":jsonObject.getString("qxxx");
        this.kglx = jsonObject.getString("kglx")==null?"":jsonObject.getString("kglx");
        this.ssgt = jsonObject.getString("ssgt")==null?"":jsonObject.getString("ssgt");
        this.sbxh = jsonObject.getString("sbxh")==null?"":jsonObject.getString("sbxh");
        this.pdxId = jsonObject.getString("pdxId");
        this.gtcz = jsonObject.getString("gtcz")==null?"":jsonObject.getString("gtcz");
        this.sbrl = jsonObject.getString("sbrl")==null?"":jsonObject.getString("sbrl");
        this.workLineId = jsonObject.getString("workLineId")==null?"":jsonObject.getString("workLineId");
    }

    @Generated(hash = 1032169579)
    public Equipment(String id, String name, String type, int code, Double lon,
            Double lat, Date createTime, String createBy, Date modifyTime,
            String modifyBy, String previousEquipmentId, String workLineId,
            String dxlx, String dlxh, String lxfs, String tgjs, String sbzt,
            String gtxz, String gtxh, String jcxs, String sfnw, String qxxx,
            String kglx, String ssgt, String sbxh, String kgzt, String sbrl,
            String gtcz, String pdxId) {
        this.id = id;
        this.name= name;
        this.type = type;
        this.code = code;
        this.lon = lon;
        this.lat = lat;
        this.createTime = createTime;
        this.createBy = createBy;
        this.modifyTime = modifyTime;
        this.modifyBy = modifyBy;
        this.previousEquipmentId = previousEquipmentId;
        this.workLineId = workLineId;
        this.dxlx = dxlx;
        this.dlxh = dlxh;
        this.lxfs = lxfs;
        this.tgjs = tgjs;
        this.sbzt = sbzt;
        this.gtxz = gtxz;
        this.gtxh = gtxh;
        this.jcxs = jcxs;
        this.sfnw = sfnw;
        this.qxxx = qxxx;
        this.kglx = kglx;
        this.ssgt = ssgt;
        this.sbxh = sbxh;
        this.kgzt = kgzt;
        this.sbrl = sbrl;
        this.gtcz = gtcz;
        this.pdxId = pdxId;
    }

    @Generated(hash = 748305627)
    public Equipment() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Double getLon() {
        return this.lon;
    }

    public void setLon(Double lon) {
        this.lon = lon;
    }

    public Double getLat() {
        return this.lat;
    }

    public void setLat(Double lat) {
        this.lat = lat;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCreateBy() {
        return this.createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getModifyTime() {
        return this.modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getModifyBy() {
        return this.modifyBy;
    }

    public void setModifyBy(String modifyBy) {
        this.modifyBy = modifyBy;
    }

    public String getPreviousEquipmentId() {
        return this.previousEquipmentId;
    }

    public void setPreviousEquipmentId(String previousEquipmentId) {
        this.previousEquipmentId = previousEquipmentId;
    }

    public String getWorkLineId() {
        return this.workLineId;
    }

    public void setWorkLineId(String workLineId) {
        this.workLineId = workLineId;
    }

    public String getDxlx() {
        return this.dxlx;
    }

    public void setDxlx(String dxlx) {
        this.dxlx = dxlx;
    }

    public String getDlxh() {
        return this.dlxh;
    }

    public void setDlxh(String dlxh) {
        this.dlxh = dlxh;
    }

    public String getLxfs() {
        return this.lxfs;
    }

    public void setLxfs(String lxfs) {
        this.lxfs = lxfs;
    }

    public String getTgjs() {
        return this.tgjs;
    }

    public void setTgjs(String tgjs) {
        this.tgjs = tgjs;
    }

    public String getSbzt() {
        return this.sbzt;
    }

    public void setSbzt(String sbzt) {
        this.sbzt = sbzt;
    }

    public String getGtxz() {
        return this.gtxz;
    }

    public void setGtxz(String gtxz) {
        this.gtxz = gtxz;
    }

    public String getGtxh() {
        return this.gtxh;
    }

    public void setGtxh(String gtxh) {
        this.gtxh = gtxh;
    }

    public String getJcxs() {
        return this.jcxs;
    }

    public void setJcxs(String jcxs) {
        this.jcxs = jcxs;
    }

    public String getSfnw() {
        return this.sfnw;
    }

    public void setSfnw(String sfnw) {
        this.sfnw = sfnw;
    }

    public String getQxxx() {
        return this.qxxx;
    }

    public void setQxxx(String qxxx) {
        this.qxxx = qxxx;
    }

    public String getKglx() {
        return this.kglx;
    }

    public void setKglx(String kglx) {
        this.kglx = kglx;
    }

    public String getSsgt() {
        return this.ssgt;
    }

    public void setSsgt(String ssgt) {
        this.ssgt = ssgt;
    }

    public String getSbxh() {
        return this.sbxh;
    }

    public void setSbxh(String sbxh) {
        this.sbxh = sbxh;
    }

    public String getKgzt() {
        return this.kgzt;
    }

    public void setKgzt(String kgzt) {
        this.kgzt = kgzt;
    }

    public String getSbrl() {
        return this.sbrl;
    }

    public void setSbrl(String sbrl) {
        this.sbrl = sbrl;
    }

    public String getGtcz() {
        return this.gtcz;
    }

    public void setGtcz(String gtcz) {
        this.gtcz = gtcz;
    }

    public String getPdxId() {
        return this.pdxId;
    }

    public void setPdxId(String pdxId) {
        this.pdxId = pdxId;
    }




}
